home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / exey.c < prev    next >
C/C++ Source or Header  |  1991-07-05  |  1KB  |  36 lines

  1. /*****************************************************************************
  2.  
  3.     ExeY()
  4.  
  5.     This function executes a Y command.
  6.  
  7.     Y    Read into buffer
  8. *****************************************************************************/
  9.  
  10. #include "zport.h"        /* define portability identifiers */
  11. #include "tecoc.h"        /* define general identifiers */
  12. #include "defext.h"        /* define external global variables */
  13. #include "deferr.h"        /* define identifiers for error messages */
  14.  
  15. DEFAULT ExeY()                          /* Y command */
  16. {
  17.     DBGFEN(1,"ExeY",NULL);
  18.  
  19.     if (EStTop > EStBot) {            /* if numeric argument */
  20.         ErrMsg(ERR_NYA);        /* numeric argument with Y */
  21.         DBGFEX(1,DbgFNm,"FAILURE");
  22.         return FAILURE;
  23.     }
  24.  
  25.     if ((EdFlag & ED_YANK_OK) == 0) {    /* if no yank when full EBf */
  26.         if (IsOpnO[CurOut] &&        /* if output file is open */
  27.             ((GapBeg != EBfBeg) || (GapEnd != EBfEnd))) {
  28.             ErrMsg(ERR_YCA);    /* Y command aborted */
  29.             DBGFEX(1,DbgFNm,"FAILURE");
  30.             return FAILURE;
  31.         }
  32.     }
  33.     DBGFEX(1,DbgFNm,"ExeEY()");
  34.     return ExeEY();
  35. }
  36.